package com.taotao.item.pojo;

import com.taotao.pojo.TbItem;
/**
 * 使用Item继承TbItem，在pojo中添加一个获取Images属性
 * @author created by wq
 * @date   Sep 4, 2017---10:24:48 PM
 * @return
 * @throws Exception<br/>
 *==========History========== <br/>
 * taotao-item-web Sep 4, 2017
 */
public class Item extends TbItem {

	public String[] getImages(){
		String image2 = this.getImage();
		if(image2 != null && !"".equals(image2)){
			String[] strings = image2.split(",");
			return strings;
		}
		return null;
	}
	
	public Item(){
		
	}
	
	public Item(TbItem tbItem){
		this.setBarcode(tbItem.getBarcode());
		this.setCid(tbItem.getCid());
		this.setCreated(tbItem.getCreated());
		this.setId(tbItem.getId());
		this.setImage(tbItem.getImage());
		this.setNum(tbItem.getNum());
		this.setPrice(tbItem.getPrice());
		this.setSellPoint(tbItem.getSellPoint());
		this.setStatus(tbItem.getStatus());
		this.setTitle(tbItem.getTitle());
		this.setUpdated(tbItem.getUpdated());
	}
}
